import { axios } from '@/utils/request'

/**
 * 查询账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
export function houseBillPage (parameter) {
  return axios({
    url: '/houseBill/page',
    method: 'get',
    params: parameter
  })
}
/**
 * 查询账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
 export function houseBillPageByLeaseId (parameter) {
  return axios({
    url: '/houseBill/pageByLeaseId',
    method: 'get',
    params: parameter
  })
}

export function detailByBillId (id, type) {
  return axios({
    url: '/houseBillDetail/detailByBillId/' + id + '/' + type,
    method: 'get'
  })
}

/**
 * 账单列表
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
export function houseBillList (parameter) {
  return axios({
    url: '/houseBill/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
export function houseBillAdd (parameter) {
  return axios({
    url: '/houseBill/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
export function houseBillEdit (parameter) {
  return axios({
    url: '/houseBill/edit',
    method: 'post',
    data: parameter
  })
}

export function houseBillEditDt (parameter) {
  return axios({
    url: '/houseBill/editDt',
    method: 'post',
    data: parameter
  })
}

export function houseBillTuoQianEdit (parameter) {
  return axios({
    url: '/houseBill/editTuoQian',
    method: 'post',
    data: parameter
  })
}

export function houseBillDaoZhangEdit (parameter) {
  return axios({
    url: '/houseBill/editDaozang',
    method: 'post',
    data: parameter
  })
}

export function houseBillcheXiaoDaoZhangEdit (parameter) {
  return axios({
    url: '/houseBill/editCheXiaoDaoZang',
    method: 'post',
    data: parameter
  })
}

/**
 * 清算賬單
 */
export function houseBillQingSuanEdit (parameter) {
  return axios({
    url: '/houseBill/editQingSuan',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
export function houseBillDelete (parameter) {
  return axios({
    url: '/houseBill/delete',
    method: 'post',
    data: parameter
  })
}

export function houseBillPrintMsgForBill (parameter) {
  return axios({
    url: '/houseBill/getPrintMsgForBill/' + parameter,
    method: 'get'
  })
}

export function getBillListByLeaseId (parameter) {
  return axios({
    url: '/houseBill/getBillListByLeaseId/' + parameter,
    method: 'get'
  })
}

export function getHouseBillNum (parameter) {
  return axios({
    url: '/houseBill/getHouseBillNum',
    method: 'post',
    data: parameter
  })
}

export function exportExcel (parameter) {
  return axios({
    url: '/houseBill/exportExcel',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

export function getWaterBillById (parameter) {
  return axios({
    url: '/houseBill/getWaterBillById/' + parameter,
    method: 'get'
  })
}

export function houseBillAnalyPage (parameter) {
  return axios({
    url: '/houseBill/analysispage',
    method: 'get',
    params: parameter
  })
}
